package com.cc.study.parent;

import org.junit.Test;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestParent {

    @Test
    public void demo01(){
        String xmlPath = "parent.xml";
        AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);
        Son son = applicationContext.getBean("son",Son.class);
        System.out.println(son.getMessage1());
        System.out.println(son.getMessage2());
        System.out.println(Son.class.getSuperclass());
    }
}
